Example Motif Application Using SGIHelp This application is intended to show the developer how the SGIHelp system can work for you. It displays (in the included sample code, exampleAppXm.c) usage of various widgets, a sample help menu, full-context-sensitivity, and calls to the SGIHelp server process via the API.
exampleAppXm Main Window
The application itself is very simple, composed of a File menu, a Help menu, a Pushbutton, and a Label. The user can choose items from the Help menu to contact the SGIHelp server process to cause different help cards to be rendered. To quit the application, use the "Exit" command found under the File menu.
The File Menu The following items (and their functions) are part of the File menu: Exit Used to quit the exampleAppXm application. The Help Menu The following items (and their functions) are part of the Help menu: Click for Help Used to put the application in context sensitive mode. Will cause the cursor to turn into a "?" at which point the user can click on any entry in the application's window to obtain help. Overview Used to display a help overview card for the current window. Index Used to display from SGIHelp an Index of help topics for the given application. Keys & Shortcuts Used to display a help card that describes any special key combinations this application uses. Product Info Pops up a dialog that displays to the user any version or copyright information for this application. To access any menu items, click on the menu item that is a part of the menubar. When the menu pops-up, highlight the desired item, and release the mouse button. A Label You have clicked on a Label. It simply displays information to the user and serves no other useful pourpose. Basically, a label is useless. For information only. A Pushbutton You have clicked on a Pushbutton. A pushbutton, when clicked, will activate some type of command within the application. Keys and Shortcuts This card displays all known keys and shortcuts for this application. This application has no shortcuts. A Sample Help Task When creating your application and help text, you may wish to highlight certain common tasks. This help card was displayed from either a menu item or a pushbutton. To perform such an operation within your code, the associated callback that contacts the SGIHelp server can be constructed as shown below. Sample Help Task Callback The following is a listing derived from a "C" program: /* create menu items, pushbuttons, etc. */ void taskCB() { /* * For the task found in the help menu, * we'll use a specific key/book * combination. */ SGIHelpMsg("key", "myBook", NULL); } It's relatively simple process to integrate help into your application. In fact, the SGIHelp process only requires two function calls. Glossary SGIHelp This is Silicon Graphics, Inc. version of a "Xhelp" compatible server. Through the use of an available API, and a help text compiler, books can be constructed that can be used to render help information for the given application.